<#include "common/main.html">
<#macro bodyId>merchandise-mg</#macro>
<#macro content>

<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main ty-common-page">
    <h1 class="page-header">金融产品列表
        <!--<div class="btns">-->
            <!--<a class="btn btn-success" href="${rc.contextPath}/financial/product/detail">新增金融产品</a>-->
        <!--</div>-->
    </h1>
    <div class="tool-bar">
        <div class="filter">
            <form action="" method="get">
                <div class="form-group">
                    <div class="col-sm-11">
                        <div class="col4">
                            <span class="label-text">产品名称：</span>
                            <input class="form-control" name="title" value="${queryDto.name}"/>
                        </div>
                        <div class="col6">
                            <span class="label-text">状态：</span>
                            <select class="form-control" name="financialProductStatus">
                            	   <option value=""  <#if queryDto.status==null>selected="true"</#if>>全部</option>
                            	   <option value="1" <#if queryDto.status=='1' >selected="true"</#if>>启用</option>
                            	   <option value="0" <#if queryDto.status=='0' >selected="true"</#if>>禁用</option>
                            </select>
                        </div>
                        <button type="submit" class="btn btn-success">查询</button>
                    </div>
                </div>
            </form>
        </div>
    </div>
    <div class="table-responsive">
        <table class="table ac-table table-hover">
            <thead>
            <tr>
                <th>产品ID</th>
                <th>产品名称</th>
                <th>产品图片</th>
                <th>产品详情图片</th>
                <th>产品状态</th>
                <th>更新时间</th>
                <th class="operate1">操作</th>
            </tr>
            </thead>
            <tbody>
            <#list financialProductList as financialProduct>
            <tr>
                <td>${financialProduct.id}</td>
                <td>${financialProduct.name}</td>
                <td><#if financialProduct.description?starts_with("http://") || financialProduct.description?starts_with("https://")>
                    <a href="${financialProduct.description}" target="_blank"><img src="${financialProduct.description}" style="width:80px;"/></a>
                </#if></td>
                
                <td><#if financialProduct.detailImgUrl?starts_with("http://") || financialProduct.detailImgUrl?starts_with("https://")>
                    <a href="${financialProduct.detailImgUrl}" target="_blank"><img src="${financialProduct.detailImgUrl}" style="width:80px;"/></a>
                </#if></td>
                <td><#if financialProduct.status=='1'>启用</#if><#if financialProduct.status=='0'>禁用</#if></td>
                <td>${financialProduct.updateTime?number?number_to_datetime?string("yyyy-MM-dd HH:mm")}</td>
                <td class="operation">
                    <div class="dropdown">
                        <a class="J_edit" data-toggle="dropdown" href="#">操作 <span class="caret"></span></a>
                        <ul class="dropdown-menu" role="menu" aria-labelledby="dLabel">
                            <li><a href="/financial/product/detail?id=${financialProduct.id}">修改</a></li>
                        </ul>
                    </div>
                </td>
            </tr>
            </#list>
            </tbody>
        </table>
    </div>
    <#include "common/page.html">
</div>

<script>
    var config = {
  		updateStatus:'/financialProduct/delete'
    }
</script>

</#macro>